home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 2: CDPD 1 / Almathera Ten on Ten - Disc 2: CDPD 1.iso / pd / 401-425 / 417 / memlook / memlook.asm < prev    next >
Assembly Source File  |  1995-03-14  |  6KB  |  377 lines

  1. execbase     = 4
  2. allocmem     = -198
  3. freemem      = -210
  4. openlib      = -552
  5. closelib     = -414
  6. ;
  7. initbitmap   = -390
  8. initrastport = -198
  9. text         = -060
  10. move         = -240
  11. setapen      = -342
  12. rectfill     = -306
  13. clipblit     = -552
  14. ;
  15. bsr    opengfx
  16. beq    end2
  17. bsr    initscr
  18. beq    ende
  19. bsr    status
  20. bsr    balken
  21. moveq    #0,d1
  22. loop:
  23. cmpi.b    #$3c,$dff006
  24. bne    loop
  25. move    $dff00a,d0
  26. lsr    #8,d0
  27. and.l    #$ff,d0
  28. move    y,d2
  29. move    d0,y
  30. cmp.b    d0,d2
  31. blt    wenig
  32. bgt    mehr
  33. bsr    los
  34. btst    #6,$bfe001
  35. bne    hinl
  36. btst    #10,$dff016
  37. beq    ende3
  38. hinl:
  39. btst    #6,$bfe001
  40. bne    nu
  41. move.l    horu,d0
  42. moveq    #1,d1
  43. move.b    #"<",htexte-2
  44. cmp.l    #0,d0
  45. beq    wert
  46. moveq    #0,d1
  47. move.b    #">",htexte-2
  48. wert:
  49. move.l    d1,horu
  50. bsr    status
  51. bra    loop
  52. nu:
  53. btst    #10,$dff016
  54. bne    no
  55. move.l    flaglh,d0
  56. moveq    #1,d1
  57. move.l    cop,a0
  58. add.l    #toll-copa,a0
  59. move    #$9200,(a0)
  60. move.b    #"H",htexte-3
  61. cmp.l    #0,d0
  62. beq    wert2
  63. moveq    #0,d1
  64. move    #$1200,(a0)
  65. move.b    #"L",htexte-3
  66. wert2:
  67. move.l    d1,flaglh
  68. bsr    status
  69. bra    loop
  70. no:
  71. bra    loop
  72. ende3:
  73. bsr    closescr
  74. ende:
  75. bsr    closegfx
  76. ende2:
  77. moveq    #0,d0
  78. rts
  79. ;
  80. scroll:
  81. move.l    gfxbase,a6
  82. move.l    rast,a0
  83. move.l    rast,a1
  84. moveq    #1,d0
  85. moveq    #0,d1
  86. moveq    #0,d2
  87. moveq    #0,d3
  88. move.l    #199,d4
  89. moveq    #10,d5
  90. move.l    #$c0,d6
  91. jsr    clipblit(a6)
  92. move.l    texta,d0
  93. add.l    #1,d0
  94. cmp.l    #8,d0
  95. bne    nna
  96. bsr    texter
  97. moveq    #0,d0
  98. nna:
  99. move.l    d0,texta
  100. rts
  101. ;
  102. texter:
  103. move.l    gfxbase,a6
  104. move.l    rast,a1
  105. move.l    #191,d0
  106. moveq    #7,d1
  107. jsr    move(a6)
  108. move.l    gfxbase,a6
  109. move.l    rast,a1
  110. lea    textert,a0
  111. add.l    pose,a0
  112. moveq    #1,d0
  113. jsr    text(a6)
  114. move.l    pose,d0
  115. add.l    #1,d0
  116. move.l    d0,d1
  117. add.l    #textert,d1
  118. cmp.l    #texterte,d1
  119. bne    nidsnzu
  120. moveq    #0,d0
  121. nidsnzu:
  122. move.l    d0,pose
  123. rts
  124. ;
  125. mehr:
  126. move.l    speed,d0
  127. cmp.l    #8,d0
  128. beq    loop
  129. add.l    #1,d0
  130. move.l    d0,speed
  131. bra    loop
  132. wenig:
  133. move.l    speed,d0
  134. cmp.l    #0,d0
  135. beq    loop
  136. sub.l    #1,d0
  137. move.l    d0,speed
  138. bra    loop
  139. ;
  140. opengfx:
  141. move.l    execbase,a6
  142. lea    gfxname,a1
  143. moveq    #0,d0
  144. jsr    openlib(a6)
  145. move.l    d0,gfxbase
  146. rts
  147. ;
  148. status:
  149. move.l    gfxbase,a6
  150. move.l    rast,a1
  151. move.l    #200,d0
  152. moveq    #7,d1
  153. jsr    move(a6)
  154. move.l    gfxbase,a6
  155. move.l    rast,a1
  156. lea    texte,a0
  157. moveq    #2,d0
  158. jsr    text(a6)
  159. rts
  160. ;
  161. closegfx:
  162. move.l    execbase,a6
  163. move.l    gfxbase,a1
  164. jsr    closelib(a6)
  165. rts
  166. ;
  167. balken:
  168. move.l    gfxbase,a6
  169. move.l    rast,a1
  170. moveq    #0,d0
  171. jsr    setapen(a6)
  172. move.l    gfxbase,a6
  173. move.l    rast,a1
  174. move.l    #220,d0
  175. moveq    #0,d1
  176. move.l    #230,d2
  177. moveq    #8,d3
  178. jsr    rectfill(a6)
  179. move.l    gfxbase,a6
  180. move.l    rast,a1
  181. moveq    #1,d0
  182. jsr    setapen(a6)
  183. move.l    gfxbase,a6
  184. move.l    rast,a1
  185. move.l    #220,d0
  186. moveq    #8,d1
  187. sub.l    speed,d1
  188. move.l    #230,d2
  189. moveq    #8,d3
  190. jsr    rectfill(a6)
  191. rts
  192. ;
  193. los:
  194. bsr    scroll
  195. move.l    adr,d1
  196. move.l    d1,d0
  197. move.l    cop,a0
  198. add.l    #plan-copa,a0
  199. bsr    eint
  200. move.l    speed,d0
  201. mulu    #40,d0
  202. move.l    flaglh,d2
  203. add.l    #1,d2
  204. mulu    d2,d0
  205. move.l    horu,d4
  206. cmp.l    #1,d4
  207. beq    ju
  208. add.l    d0,d1
  209. bra    ja
  210. ju:
  211. sub.l    d0,d1
  212. ja:
  213. cmp.l    #0,d1
  214. bge    a5zae
  215. move.l    #524288,d1
  216. a5zae:
  217. cmp.l    #524288,d1
  218. ble    a0zae
  219. moveq    #0,d1
  220. a0zae:
  221. move.l    d1,adr
  222. lsl.l    #4,d1
  223. moveq    #7,d0
  224. lea    htexte+1,a0
  225. hlo:
  226. move.l    d1,d2
  227. and.l    #$f,d2
  228. lea    hexta,a1
  229. add.l    d2,a1
  230. move.b    (a1),(a0)+
  231. rol.l    #4,d1
  232. dbra    d0,hlo
  233. move.l    gfxbase,a6
  234. move.l    rast,a1
  235. move.l    #240,d0
  236. moveq    #7,d1
  237. jsr    move(a6)
  238. move.l    gfxbase,a6
  239. move.l    rast,a1
  240. lea    htexte,a0
  241. moveq    #9,d0
  242. jsr    text(a6)
  243. bsr    balken
  244. rts
  245. ;
  246. initscr:
  247. move.l    execbase,a6
  248. move.l    #$10003,d1
  249. move.l    #40*20+cope-copa+116,d0
  250. jsr    allocmem(a6)
  251. beq    end2
  252. lea    copa,a0
  253. move.l    d0,plane1
  254. bsr    eint
  255. add.l    #10*40,d0
  256. move.l    d0,plane2
  257. bsr    eint
  258. add.l    #10*40,d0
  259. move.l    d0,cop
  260. add.l    #cope-copa,d0
  261. move.l    d0,bitm
  262. add.l    #16,d0
  263. move.l    d0,rast
  264. ; Copperliste copieren
  265. move.l    cop,a1
  266. lea    copa,a0
  267. move.l    #cope-copa-1,d0
  268. coop:
  269. move.b    (a0)+,(a1)+
  270. dbra    d0,coop
  271. move.l    bitm,a0
  272. move.l    gfxbase,a6
  273. moveq    #1,d0
  274. move.l    #320,d1
  275. moveq    #10,d2
  276. jsr    initbitmap(a6)
  277. move.l    bitm,a0
  278. move.l    plane1,8(a0)
  279. move.l    gfxbase,a6
  280. move.l    rast,a1
  281. jsr    initrastport(a6)
  282. move.l    rast,a1
  283. move.l    bitm,4(a1)
  284. move    #$4000,$dff09a
  285. move.l    cop,$dff084
  286. clr    $dff08a
  287. move.l    plane2,a0
  288. add.l    #24,a0
  289. moveq    #9,d0
  290. klop:
  291. move.b    #$ff,(a0)
  292. add.l    #40,a0
  293. dbra    d0,klop
  294. moveq    #1,d0
  295. end2:
  296. tst.l    d0
  297. rts
  298. ;
  299. closescr:
  300. clr    $dff088
  301. move    #$c000,$dff09a
  302. move.l    execbase,a6
  303. move.l    plane1,a1
  304. move.l    #40*20+cope-copa+116,d0
  305. jsr    freemem(a6)
  306. move    #$8020,$dff096
  307. rts
  308. ;
  309. eint:
  310. swap    d0
  311. add.l    #2,a0
  312. move    d0,(a0)+
  313. swap    d0
  314. add.l    #2,a0
  315. move    d0,(a0)+
  316. rts
  317. ;
  318. horu:     dc.l 0
  319. y:     dc.w 0
  320. speed:     dc.l 8
  321. flaglh:     dc.l 1
  322. adr:     dc.l 0
  323. gfxbase: dc.l 0
  324. gfxname: dc.b "graphics.library",0
  325. texte:     dc.b "H>",0
  326. htexte:     dc.b "$00000000"
  327. hexta:     dc.b "0123456789ABCDEF",0
  328. plane1:     dc.l 0
  329. plane2:     dc.l 0
  330. rast:     dc.l 0
  331. bitm:     dc.l 0
  332. cop:     dc.l 0
  333. pose:     dc.l 0
  334. texta:     dc.l 0
  335. copa:
  336. dc.w    $e0,0,$e2,0,$e4,0,$e6,0
  337. dc.w    $100,$2200
  338. dc.w    $8e,$2c81,$90,$f4c1,$92,$38,$94,$d0,$96,$20
  339. dc.w    $2c0f,$fffe,$0180,$f,$0182,$f00,$0184,$f,$186,$f
  340. dc.w    $2d0f,$fffe,$0182,$f10,$108,-40,$10a,-40
  341. dc.w    $2e0f,$fffe,$0182,$f20,$108,0,$10a,0
  342. dc.w    $2f0f,$fffe,$0182,$f30,$108,-40,$10a,-40
  343. dc.w    $300f,$fffe,$0182,$f40,$108,0,$10a,0
  344. dc.w    $310f,$fffe,$0182,$f50,$108,-40,$10a,-40
  345. dc.w    $320f,$fffe,$0182,$f60,$108,0,$10a,0
  346. dc.w    $330f,$fffe,$0182,$f70,$108,-40,$10a,-40
  347. dc.w    $340f,$fffe,$0182,$f80,$108,0,$10a,0
  348. dc.w    $350f,$fffe,$0182,$f90,$108,-40,$10a,-40
  349. dc.w    $360f,$fffe,$0182,$fa0,$108,0,$10a,0
  350. dc.w    $370f,$fffe,$0182,$fb0,$108,-40,$10a,-40
  351. dc.w    $380f,$fffe,$0182,$fc0,$108,0,$10a,0
  352. dc.w    $390f,$fffe,$0182,$fd0,$108,-40,$10a,-40
  353. dc.w    $3a0f,$fffe,$0182,$fe0,$108,0,$10a,0
  354. dc.w    $3b0f,$fffe,$0182,$ff0,$3c0f,$fffe,$0180,0,$184,0
  355. dc.w    $3d0f,$fffe,$100
  356. toll:    dc.w $9200,$0180,0,$0182,$fff
  357. plan:    dc.w $e0,0,$e2,0
  358. dc.w    $c30f,$fffe,$0180,$0
  359. dc.l    -2
  360. cope:
  361. textert:
  362. dc.b "Here is the new version of MEMLOOK called ´MEMLOOK II´ "
  363. dc.b " written by Thomas Jansen ...    HELP : the right Mouse"
  364. dc.b "button - You can change the viewmode ( Lores - Hires ) ... "
  365. dc.b ", left Mousebutton - You can change the direction of the "
  366. dc.b "scrolling ( Memory ) , Mouse up / down - the scroll-speed will "
  367. dc.b "go faster or slower ... , left & right Mousebutton - Quit "
  368. dc.b "MEMLOOK    *     If you want to contact me , write to : T. J"
  369. dc.b "ansen / Hauptstraße 21 / 4773 Möhnesse ( Körbecke ) / W-"
  370. dc.b "Germany     Some of my other tools : Special-Windows ( You "
  371. dc.b "can close windows or you can edit the title or the IDCMP-"
  372. dc.b "Flag ) , ALERT3.5 ( You can edit alert´s ... ) , Mouse ( "
  373. dc.b "You can draw and use Mousepointers with 16 Colors ! ) ..."
  374. dc.b " Greetings to : Oliver Wagner , Peter Handle , Andreas ... "
  375. dc.b " WAIT : This Programm is Freeware ...                      "
  376. texterte:
  377.